package zyq;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import zyq.dao.UserDao;
import zyq.po.User;

import java.util.List;

public class Test {

    public static void main(String[] args) {
        ApplicationContext ac=
                new ClassPathXmlApplicationContext("applicationContext.xml");
        //UserDao dao=ac.getBean("userDao",UserDao.class);
        UserDao dao=ac.getBean(UserDao.class);
        //System.out.println(dao.findUserById(1));

        //List<User> list= dao.selectUsers();
        //System.out.println("list = " + list);

        //User user=new User("zyq","213","beijing");
        //dao.addUser(user);

        dao.deleteUser(12);


        //dao.updateUser( new User(1,"张夏","23","北京") );
    }

}
